<template>
  <div class="header" :style="headerSty">
    <h4>{{title || '标题'}}</h4>
  </div>
</template>

<script>
export default {
  name: 'MyHeader',
  props: ['title', 'bgColor', 'color'],
  data() {
    return {
      headerSty: {
        backgroundColor: this.bgColor,
        color: this.color
      }
    };
  }
};
</script>

<style scoped>
.header {
  height: 70px;
  width: 100%;
  text-align: center;
  line-height: 30px;
  background-color: skyblue;
  color: aliceblue;
  font-size: 16px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
}
</style>